[−][src]Crate activitystreams_types
ActivityStreams Types
This crate defines the base set of types from the Activity Streams specification.
Example Usage
extern crate activitystreams_types; extern crate failure; extern crate serde_json; use activitystreams_types::{context, link::Mention}; use failure::Error; fn run() -> Result<(), Error> { /// A Mention is the only predefined Link type in the Activity Streams spec let mut mention = Mention::default(); mention.link_props.set_context_object(context())?; let mention_string = serde_json::to_string(&mention)?; let mention: Mention = serde_json::from_str(&mention_string)?; Ok(()) }
Modules
activity | |
actor | Namespace for Actor types |
collection | Namespace for Collection types |
link | Namespace for Link types |
object | Namespace for Object types |
Structs
ContextObject | Define a simple wrapper around a string for this crate's main Context type |
CustomLink | A custom type extending Link |
CustomObject | A custom type extending Object |
Functions
context | The context associated with all of the Activity Streams types defined in the crate. |